﻿using AbstructFactory;
using ADManage.api.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
using XF.Meeting.Api.Common;
using XF.Meeting.Api.Models;
using XF.Meeting.Common;
using XF.Meeting.Entity.Query;

namespace XF.Meeting.Api.Controllers
{
    public class PadController : ApiController
    {
        public AbsFactoryTE abs = (AbsFactoryTE)AbsFactory.CreateInterface();
        [HttpPost]
        public  void SendWxMessage([FromBody] ObjBase<CRoomPadQuery> query)
        {
            var service = new WeChatHelper();
            query.obj.type = 1;
         //   service.SendWxMssage(query.obj,true);
          


        }
        [HttpPost]
        public async Task<IHttpActionResult> MeetingUpdate([FromBody] ObjBase<CRoomPadQuery> query)
        {
            var service = abs.CreateConferenceRoomInterface("pad", IPHelper.GetIPAddress);
            var aaa = await service.MeetUpdateEnd(query.obj.CInfoId);
            var res = new ResultBase<string>()
            {
                data = aaa.ToString(),
                success = true,
                errormsg = ""
            };
            var data = new ObjBase<ResultBase<string>>()
            {
                obj = res,
                secret = "123"
            };
            return Content(HttpStatusCode.OK, data);
        }
    }
}
